﻿
Partial Class Account_Login
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        RegisterHyperLink.NavigateUrl = "Register.aspx?ReturnUrl=" + HttpUtility.UrlEncode(Request.QueryString("ReturnUrl"))

    End Sub

    Protected Sub LoginUser_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) Handles LoginUser.Authenticate
        Dim objUsuario As New clsUsuarios

        If objUsuario.DoAutenticarUsuario(LoginUser.UserName, LoginUser.Password) Then
            FormsAuthentication.RedirectFromLoginPage(LoginUser.UserName, LoginUser.RememberMeSet)

            'HttpContext.Current.User.Identity.Name
            Response.Redirect("~/")

        End If

    End Sub
End Class